/*zA55aoHexmQNw+wGMcURwnb9hMcA9d3uO+17gDEOEGjbn9Vp6v2Zyuc3x9tT9SMz*/
/*
 * @Author: xiahui 
 * @PageInfo: 删行
 * @Date: 2019-03-06 16:34:38 
 * @Last Modified by: xiahui
 * @Last Modified time: 2019-07-20 11:01:49
 */
import { AREA, FIELDS, UISTATUS } from '../../constance';
import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
import { buttonControl } from '../viewControl/buttonControl';

export default function(props, record, index) {
	let naccumpayorgmny = record.values[FIELDS.naccumpayorgmny].value;
	let naccumpayapporgmny = record.values[FIELDS.naccumpayapporgmny].value;
	if (naccumpayorgmny > 0 || naccumpayapporgmny > 0) {
		showErrorInfo(null, getLangByResId(this, '4004PAYPLAN-000001')); /* 国际化处理： 已经生成后续单据，不能删除*/
		return;
	}

	props.editTable.deleteTableRowsByIndex(AREA.listTableId, index);
	buttonControl.call(this, props, UISTATUS.edit, props.editTable.getCheckedRows(AREA.listTableId));
}

/*zA55aoHexmQNw+wGMcURwnb9hMcA9d3uO+17gDEOEGjbn9Vp6v2Zyuc3x9tT9SMz*/